package com.bookocean.infrastructure.persistence.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 通用收藏PO类
 * 
 * @author BookOcean
 * @since 2024-01-01
 */
@Data
@TableName("favorite_po")
public class BookFavoritePO {

    /**
     * 收藏ID
     */
    @TableId(value = "favorite_id", type = IdType.AUTO)
    private Long favoriteId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 目标类型（1：书摘，2：小说，3：章节）
     */
    @TableField(value = "target_type")
    private Integer targetType;

    /**
     * 目标ID（书摘ID/小说ID/章节ID）
     */
    @TableField(value = "target_id")
    private Long targetId;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private LocalDateTime createdAt;
}
